<template>
  <div class="edit_box">
    <div class="op">
      <i class="icon icon-edit" @click="$emit('edit')"></i>
      <i class="icon icon-guanbi" @click="$emit('delete')"></i>
    </div>
    <slot></slot>
  </div>
</template>
<script>
  export default {
    methods: {
    }
  }
</script>
<style lang="scss">
  .edit_box{
    &{position:relative;display:inline-block;width:100%;min-height: 18px;}
    &:hover{outline:1px solid #ccc;}
    .op{display:none;position:absolute;top:0;right:0;background:#666;z-index:99}
    &:hover .op{display:block;}
    .op .icon{margin:0 2px;color:#fff;font-weight:700;cursor:pointer;font-size:12px}
  }
</style>
